import http from '@/utils/http'
import type { LoginData, LoginRes, UserRes ,Menus} from './types'
/**
 * 登录
 */
export function login(data: LoginData) {
  return http.post<LoginRes>('/sys/login', data)
}

/**
 * 获取登录用户信息
 */
export function getUserInfo() {
  return http.get<UserRes>('/sys/user/info')
}

/**
 * 退出登陆
 */
export function logout() {
  return http.get('/sys/logout')
}
/**
 * 获取权限 数据
 */
export function getlimitsOfAuthority() {
  return http.get<Menus>('/sys/user/getMenus')
}
